package jonggyuni.basic;

import java.util.Scanner;

public class Tax_vSwitch {

	private static Scanner sc;

	public static void main(String[] args) {
		// 연봉과 결혼 여부 입력.
		// 1. 미혼 
		//    1)연봉 3000미만->10% 2)연봉 3000이상-25%
		// 2. 결혼
		//    1)연봉 6000미만->15% 2)연봉 6000이상-35%
		
		int marry;
		double salary;
		
		sc = new Scanner(System.in);
		
		System.out.print("1.결혼 , 2.미혼 :");
		marry = sc.nextInt();
		
		System.out.print("당신의 연봉을 입력하세요 : ");
		salary = sc.nextInt();
		
		switch(marry){
			case 1 : //결혼
				switch((int)salary/3000){
					case 0 :
						System.out.println("세금은 10%");
						System.out.println("세금 : " + (int)(salary*0.1) );
						break;
					default :
						System.out.println("세금은 25%");
						System.out.println("세금 : " + (int)(salary*0.25));
				}
				break;
				
			case 2 : //미혼
				switch((int)salary/6000){
					case 0 :
						System.out.println("세금은 15%");
						System.out.println("세금 : " + (int)(salary*0.15) );
						break;
					default :
						System.out.println("세금은 35%");
						System.out.println("세금 : " + (int)(salary*0.35) );
				}
				break;
			default :			
		}
/*		
		if(marry == 1){
			if(salary <3000.0){
				System.out.println("세금은 10%");
				System.out.println("세금 : " + (int)(salary*0.1) );
			}
			else{
				System.out.println("세금은 25%");
				System.out.println("세금 : " + (int)(salary*0.25));
			}
		}
		else if(marry == 2){
			if(salary < 6000.0){
				System.out.println("세금은 15%");
				System.out.println("세금 : " + (int)(salary*0.15) );
			}
			else{
				System.out.println("세금은 35%");
				System.out.println("세금 : " + (int)(salary*0.35) );
			}

		}*/
	}

}
